import React from "react";

const Demo = function DemoOne(prop){
    let {children} = prop;
    children = React.Children.toArray(children);
    let headerSlot = children.filter(v=>v.props.slot === 'header');
    return <>
        <h2>hello world</h2>
        {headerSlot.map((item,index)=>{
            return <li key={index}>
                {item}
            </li>;
        })}
    </>
} 

// Demo.defaultProps ={
//     id:'1',
//     name:'2'
// }
console.log(Demo);
export default Demo;